<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>九九乘法表</title>
	<script type="text/javascript">
	for(var i=9;i>=1;i--){
		document.write('<div class="on">')
		for(var j=1;j<=i;j++){
			if((j%2) != 0){
				document.write('<div class="in" style="background-color:red">',j,'*',i,'=',i*j,'</div>');
			}else if(j%2==0 && i%2!=0){
				document.write('<div class="in" style="background-color:#0000FF">',j,'*',i,'=',i*j,'</div>');
			}else{
				document.write('<div class="in" style="background-color:#D5DBED">',j,'*',i,'=',i*j,'</div>');
			}
		}
		document.write('</div>');
	}

	</script>
	<style type="text/css">
		body{
			width: 100%;
			height: 500px;
			
		}
		.on{
			width: 100%;
			height: 35px;
		}
		.in{
			width: 70px;
			height: 30px;
			line-height: 30px;
			text-align: center;
			float: left;
			margin-right: 3px;
			border: 1px solid red;
		}
	</style>
</head>
<body>
</body>
</html>